A musical instrument, such as a piano, can contain a mechanism (e.g., a pneumatic or electro-mechanical) for automatically performing music. The musical instrument can also include solenoid actuators that use electric current to drive mechanical assemblies of the musical instrument (e.g., key actions of a piano). When a solenoid actuator is instructed to produce a musical tone (e.g., triggered by a Musical Instrument Digital Interface (MIDI) file), the solenoid actuator can produce electromagnetic fields to control the pneumatic or electro-mechanical mechanism to strike on a string of the musical instrument and generate the musical tone. However, there may be a time delay between the instruction and the generation of the musical tone. An audience or player may regard such time delay as an unacceptable latency. Accordingly, it is desirable to provide methods and systems for automatic calibration of the musical device to reduce and/or eliminate such latency.